<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>茂名民宿短租系统</title>

  <link rel="stylesheet" href="/element-ui/lib/theme-chalk/index.css">
  <script src="app/js/Axios/axios-0.18.0.js"></script>
  <script src="app/js/Vue/vue.js"></script>
  <script src="/element-ui/lib/index.js"></script>

</head> 

<body>

<div id="app">


    登录成功了
    <!-- 测试 axios -->
    <button onclick="getLocal()">点我</button>
    <button onclick="open4()">点我,错误提示</button>

    <template>
        <el-button :plain="true" @click="open2">成功</el-button>
        <el-button :plain="true" @click="open3">警告</el-button>
        <el-button :plain="true" @click="open1">消息</el-button>
        <el-button :plain="true" @click="open4">错误</el-button>
    </template>

    <!-- 测试 vue -->
    <input v-model="username">
    {{username}}

</div>









    <script>

        // 创建 Vue 核心对象
        new Vue({
            el:"#app",
            data(){

                return{
                    username: ""
                }

            }



        })




        export default {
            methods: {
                open1() {
                    this.$message('这是一条消息提示');



                },
                open2() {
                    this.$message({
                        message: '恭喜你，这是一条成功消息',
                        type: 'success'
                    });
                },

                open3() {
                    this.$message({
                        message: '警告哦，这是一条警告消息',
                        type: 'warning'
                    });
                },

                open4() {
                    this.$message.error('错了哦，这是一条错误消息');


                }
            }
        }



        function getLocal() {
            alert("你好啊");



            axios({
                method:"get",
                url:"https://restapi.amap.com/v3/geocode/geo?address=" + "广东省茂名市电白区霞洞镇永乐小学" + "&output=JSON&key=93b332a46a820fb32ad2fe70976743f5"
                // url:"https://restapi.amap.com/v3/geocode/geo?address=" + _this.address + "&output=JSON&key=93b332a46a820fb32ad2fe70976743f5"
            }).then(function (resp) {

                alert(JSON.stringify(resp.data));

            })
        }




    </script>

</body>





</html>
